package com.itheima.admin.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.itheima.pojo.pojo.Role;
import com.itheima.pojo.pojo.RoleModule;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface RoleMapper extends BaseMapper<Role> {
    int deleteRoleUser(String roleId);
    int deleteRoleModule(String roleId);
    int addRoleToModule(@Param("roleId") String roleId,@Param("moduleIds") List<String> moduleIds);
    @Select("select * from ss_role_module where role_id=#{id}")
    List<RoleModule> selectIdList(String id);
}